<?php
/**
 * $Id: default.php 11917 2009-05-29 19:37:05Z ian $
 */
defined( '_JEXEC' ) or die( 'Restricted access' );

$cparams = JComponentHelper::getParams ('com_media');
?>
<div class="has-right">
<div id="main-body">
	<div id="main-content">

<?php
$issent=JRequest::getInt('rep',"");
if(!$issent){
if ( $this->params->get( 'show_contact_list' ) && count( $this->contacts ) > 1) : ?>

		<form action="<?php echo JRoute::_('index.php') ?>" method="post" name="selectForm" id="selectForm">
		<?php echo JText::_( 'Select Contact' ); ?>:
			<br />
			<?php echo JHTML::_('select.genericlist',  $this->contacts, 'contact_id', 'class="inputbox" onchange="this.form.submit()"', 'id', 'name', $this->contact->id);?>
			<input type="hidden" name="option" value="com_contact" />
		</form>

<?php endif; ?>
<?php if ( $this->contact->name && $this->contact->params->get( 'show_name' ) ) : ?>

		<h3 class="title"><?php echo $this->escape($this->contact->name); ?></h3>

<?php endif; ?>
<?php if ( $this->contact->con_position && $this->contact->params->get( 'show_position' ) ) : ?>

	<?php echo $this->escape($this->contact->con_position); ?>

<?php endif; ?>

				<?php echo $this->loadTemplate('address'); ?>

<?php if ( $this->contact->params->get( 'allow_vcard' ) ) : ?>

	<?php echo JText::_( 'Download information as a' );?>
		<a href="<?php echo JURI::base(); ?>index.php?option=com_contact&amp;task=vcard&amp;contact_id=<?php echo $this->contact->id; ?>&amp;format=raw&amp;tmpl=component">
			<?php echo JText::_( 'VCard' );?></a>

<?php endif;
if ( $this->contact->params->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id))
	echo $this->loadTemplate('form');
}else
	echo $this->loadTemplate('sent');
?>

	</div>
</div>
<div id="sidebar-right">
	<div class="gmap">
			<?php if ( $this->contact->image && $this->contact->params->get( 'show_image' ) ) : ?>
		<p>
					<iframe class="pad4 bor1" width="243" height="340" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=da&amp;geocode=&amp;q=Gyldenvang+Alle+9,+2770+Kastrup,+Danmark&amp;aq=0&amp;oq=Gyldenvang+Alle+9,+2770+Kastrup&amp;sll=37.0625,-95.677068&amp;sspn=36.231745,99.667969&amp;vpsrc=6&amp;ie=UTF8&amp;hq=&amp;hnear=Gyldenvang+Alle+9,+2770+Kastrup,+Denmark&amp;t=m&amp;view=map&amp;ll=55.623295,12.609816&amp;spn=0.016477,0.020771&amp;iwloc=near&amp;z=14&amp;output=embed"></iframe>
		</p>
			<?php endif; ?>
	 </div>
</div>
</div>